<!-- author: xuett -->
<!-- date: 2023-02-09 18:24:53 -->
<!-- description:  -->
<template>
  <div class="top-back">
    <el-button type="primary" @click="goBack">
      <template #icon>
        <G-svg icon="back"></G-svg>
      </template>
      返回
    </el-button>
    <el-divider class="top-divider" direction="vertical" />
    <div class="top-title">{{ title }}</div>
  </div>
</template>

<script setup>
const $emit = defineEmits(["goBack"]);

defineProps({
  title: {
    type: String,
    default: ""
  }
});

const goBack = () => {
  $emit("goBack");
};
</script>

<style scoped lang="scss">
.top-back {
  width: 100%;
  padding-bottom: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  .top-divider {
    height: 1.3em;
    margin: 0 15px;
  }
  .top-title {
    font-weight: 700;
    color: $G-themecolor;
  }
}
</style>
